[VL] Preserve ordinals for nested Substrait field references - #12821
Draft
malinjawi wants to merge 1 commit into
Draft
[VL] Preserve ordinals for nested Substrait field references#12821malinjawi wants to merge 1 commit into
malinjawi wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
Substrait identifies nested struct fields by ordinal, but the Velox converter
currently represents every level as a name-based field access. Struct fields
may have duplicate or empty names, so name lookup can select the wrong child.
Add a dedicated conversion path for full
Expression::selectionexpressions.The root input remains a
FieldAccessTypedExpr, while nested struct fields useDereferenceTypedExprwith their Substrait ordinals. Existing directFieldReferencecallers remain unchanged, and invalid references continue tofail with a user error.
Nested aggregate masks are rejected explicitly because Velox aggregation masks
must reference a top-level input field. This prevents an unsupported nested mask
from being silently dropped.
Simplified evaluation of the resulting ordinal dereference also requires
Velox #18537.
How was this patch tested?
-Werror.Was this patch authored or co-authored using generative AI tooling?
Generated-by: IBM BOB